Relational Tests
Any of the normal relational tests can be applied to strings. Two
strings are considered equal if they have the same contents and the
same length. When trying to decide if one string is less than another,
tests each character position in the string in turn. As soon
as they differ, the word containing the character that occurs first in
the character set is considered the lesser. Non-existent characters
are less than any other character. Here are some examples that make
it clearer:
> "abc" == "abcd"
0
> "dabc" == "abcd"
0
> "dabc" < "abcd"
0
> "abc" == "abcd"
0
> "abc" == "abc"
1
> "abc" == "abcd"
0
> "abc" < "abcd"
1
> "dbc" > "abcd"
1